package com.lyh.service.user;

import com.lyh.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
/*@Service*/
public interface UserService {
    //查询所有用户
    public List<User> getUserList();

    //通过id查找指定用户
    public User getUserById(@Param("id") Integer id);

    //通过userCode、userRole查找用户
    public List<User> getUserListByNameAndRole(Map<String, Object> map);

    //登录检查
    public User checkLogin(Map<String, String> map);

    //修改密码
    public int modifyPassword(@Param("id")Integer id, @Param("userPassword") String password);

    //需要查询用户的总数
    public int getUserCount(Map<String, Object> map);

    //修改用户信息
    public int modifyUser(User user);

    //添加用户
    public int userAdd(User user);

    //是否存在该用户名
    public List<User> checkUserCode(@Param("userCode") String userCode);

    //删除用户
    public int deleteUser(@Param("id") Integer id);

}
